function [residual, g1, g2] = CGH_static(y, x, params)
%
% Status : Computes static model for Dynare
%
% Inputs : 
%   y         [M_.endo_nbr by 1] double    vector of endogenous variables in declaration order
%   x         [M_.exo_nbr by 1] double     vector of exogenous variables in declaration order
%   params    [M_.param_nbr by 1] double   vector of parameter values in declaration order
%
% Outputs:
%   residual  [M_.endo_nbr by 1] double    vector of residuals of the static model equations 
%                                          in order of declaration of the equations
%   g1        [M_.endo_nbr by M_.endo_nbr] double    Jacobian matrix of the static model equations;
%                                                     columns: variables in declaration order
%                                                     rows: equations in order of declaration
%   g2        [M_.endo_nbr by (M_.endo_nbr)^2] double   Hessian matrix of the static model equations;
%                                                       columns: variables in declaration order
%                                                       rows: equations in order of declaration
%
%
% Warning : this file is generated automatically by Dynare
%           from model file (.mod)

residual = zeros( 44, 1);

%
% Model equations
%

T18 = y(35)^((1-params(1))/params(2));
T25 = params(27)*y(19)*T18+params(5)*y(9)^(1/params(2));
T46 = y(8)^(1-params(1));
T47 = T46/y(9);
T50 = params(5)*T47^(1-1/params(2));
T92 = 1/(params(34)*exp(y(39)));
T93 = y(37)/y(36)*T92;
T94 = y(27)/y(1);
T96 = T94^(1-params(33));
T108 = (y(11)*y(23))^params(7);
T113 = (y(3)*y(20))^(1-params(7));
T132 = y(12)/y(11);
T136 = 1-(params(9)+params(10)*(y(23)-1)+params(11)/2*(y(23)-1)^2)-params(12)/2*(T132-params(9))^2;
T149 = y(14)/params(14);
T150 = T149-1;
T152 = params(13)/2*T150^2;
T153 = y(10)*T152;
T198 = params(12)*(T132-params(9));
T202 = y(23)*y(15)+y(16)*(T136+T132*T198);
T298 = y(29)^(1-params(4));
T317 = params(34)*exp(y(39))*y(27)^params(33)+(1-params(34)*exp(y(39)))*y(28)^params(33);
T335 = y(30)^(1-params(35));
T359 = y(31)/y(32);
T363 = 1-(params(36)+params(37)*(y(34)-1)+params(38)/2*(y(34)-1)^2)-params(39)/2*(T359-params(36))^2;
T383 = params(35)*(1-params(34)*exp(y(39)))/(params(34)*exp(y(39)));
T385 = T383*y(28)/y(32);
T387 = (y(28)/y(27))^(params(33)-1);
T398 = params(39)*(T359-params(36));
T401 = y(34)*(params(37)+(y(34)-1)*params(38))+T363+T359*T398;
T412 = (y(28)/y(1))^(params(33)-1);
T413 = (1-params(34)*exp(y(39)))*(1-params(35))*T412;
T414 = y(28)/y(30);
T435 = (y(8)/y(35))^(1-(1-params(1))/params(2));
T437 = params(34)*exp(y(39))*y(36)*T435;
T438 = T94^(params(33)-1);
T488 = getPowerDeriv(T94,1-params(33),1);
T504 = getPowerDeriv(y(28)/y(1),params(33)-1,1);
T527 = y(20)*getPowerDeriv(y(3)*y(20),1-params(7),1);
T566 = getPowerDeriv(T47,1-1/params(2),1);
T568 = params(5)*getPowerDeriv(y(8),1-params(1),1)/y(9)*T566;
T575 = getPowerDeriv(y(8)/y(35),1-(1-params(1))/params(2),1);
T585 = getPowerDeriv(T25,params(2)/(1-params(1)),1);
T607 = y(23)*getPowerDeriv(y(11)*y(23),params(7),1);
T617 = (-(params(12)/2*(-y(12))/(y(11)*y(11))*2*(T132-params(9))));
T652 = (-(params(12)/2*2*(T132-params(9))*1/y(11)));
T672 = 1/params(14);
T724 = y(3)*getPowerDeriv(y(3)*y(20),1-params(7),1);
T754 = y(11)*getPowerDeriv(y(11)*y(23),params(7),1);
T801 = getPowerDeriv(T317,1/params(33),1);
T806 = getPowerDeriv(y(28)/y(27),params(33)-1,1);
T820 = 1/y(32);
T859 = (-(params(39)/2*T820*2*(T359-params(36))));
T886 = (-(params(39)/2*2*(T359-params(36))*(-y(31))/(y(32)*y(32))));
lhs =y(8);
rhs =params(43)*T25^(params(2)/(1-params(1)))+(1-params(43))*(params(27)*y(19)*y(35)^(1-params(1))/(1-params(1))+y(8)*params(5));
residual(1)= lhs-rhs;
lhs =y(2);
rhs =params(43)*T50+params(5)*(1-params(43));
residual(2)= lhs-rhs;
lhs =y(9);
rhs =T46;
residual(3)= lhs-rhs;
lhs =0;
rhs =params(44)*((-(y(27)+y(31)+y(4)+1/y(6)*params(15)*y(11)))+y(7)*y(3)+y(4)+y(5)+params(15)*y(11))+(1-params(44))*((-y(27))+y(10));
residual(4)= lhs-rhs;
lhs =y(7);
rhs =T93*T96;
residual(5)= lhs-rhs;
lhs =y(4);
rhs =y(2)*(y(4)+y(5));
residual(6)= lhs-rhs;
lhs =1;
rhs =y(2)*y(6);
residual(7)= lhs-rhs;
lhs =y(10);
rhs =exp(y(26))*T108*T113-params(8);
residual(8)= lhs-rhs;
lhs =y(11);
rhs =1-params(44)+params(44)*(y(12)+y(11)*T136);
residual(9)= lhs-rhs;
lhs =y(13);
rhs =y(10)-y(7)*y(3)-y(12)-T153;
residual(10)= lhs-rhs;
lhs =y(7)*y(3);
rhs =T113*T108*exp(y(26))*(1-params(7))*y(22);
residual(11)= lhs-rhs;
lhs =y(11)*y(23)*y(15);
rhs =T113*T108*exp(y(26))*params(7)*y(22);
residual(12)= lhs-rhs;
lhs =0;
rhs =params(44)*(params(42)*(T113*T108*exp(y(26))*params(7)*y(22)+y(11)*y(23)*(-y(16))*(params(10)+(y(23)-1)*params(11)))+(y(23)-1)*(1-params(42)))+(1-params(44))*(y(23)-1);
residual(13)= lhs-rhs;
lhs =T149*params(13)*T150;
rhs =1-params(6)+y(22)*params(6)+T149*T150*y(2)*params(13);
residual(14)= lhs-rhs;
lhs =y(16);
rhs =1-params(44)+params(44)*y(2)*T202;
residual(15)= lhs-rhs;
lhs =1/y(16);
rhs =params(44)*(1-T198)+(1-params(44))*(1/y(16)-y(12));
residual(16)= lhs-rhs;
lhs =y(5);
rhs =params(44)*(y(13)-params(15)*(y(11)-1/y(6)*y(11)))+(1-params(44))*y(13);
residual(17)= lhs-rhs;
lhs =log(y(21));
rhs =log(y(21))*params(16)+(1-params(16))*(params(19)+params(17)*(log(y(14))-log(params(14))));
residual(18)= lhs-rhs;
lhs =1;
rhs =T50*y(21)/y(14);
residual(19)= lhs-rhs;
lhs =y(17);
rhs =1/y(22);
residual(20)= lhs-rhs;
lhs =y(24);
rhs =1+T153;
residual(21)= lhs-rhs;
lhs =y(19);
rhs =(1-params(22))*params(24)+y(19)*params(22)+y(18)*x(1)*params(55);
residual(22)= lhs-rhs;
lhs =y(18);
rhs =(1-params(23))*params(20)+y(18)*params(23)+params(55)*params(21)*x(2);
residual(23)= lhs-rhs;
lhs =y(20);
rhs =1-params(26)+y(20)*params(26)-params(25)*x(3);
residual(24)= lhs-rhs;
lhs =y(26);
rhs =y(26)*params(26)+(1-params(26))*params(32);
residual(25)= lhs-rhs;
lhs =y(25);
rhs =params(25)*(1-params(31))+y(25)*params(31);
residual(26)= lhs-rhs;
lhs =y(35);
rhs =y(1)^params(4)*T298;
residual(27)= lhs-rhs;
lhs =y(36);
rhs =T298*params(4)*y(1)^(params(4)-1);
residual(28)= lhs-rhs;
lhs =y(37);
rhs =y(1)^params(4)*(1-params(4))*y(29)^(-params(4));
residual(29)= lhs-rhs;
lhs =y(1);
rhs =T317^(1/params(33));
residual(30)= lhs-rhs;
lhs =y(29);
rhs =1-y(3)-y(30);
residual(31)= lhs-rhs;
lhs =y(28);
rhs =params(44)*(1-params(40))*(y(34)*y(32))^params(35)*T335+T335*(1-params(44))*(1-params(40))+params(40)*params(45);
residual(32)= lhs-rhs;
lhs =y(32);
rhs =(1-params(40))*params(41)*(y(31)+y(32)*T363)+(params(40)+(1-params(40))*(1-params(41)))*params(48);
residual(33)= lhs-rhs;
lhs =0;
rhs =params(41)*params(42)*(1-params(40))*(y(34)*(-y(33))*(params(37)+(y(34)-1)*params(38))+T385*T387)+(params(40)+(1-params(40))*(1-params(41)))*(y(34)-params(50));
residual(34)= lhs-rhs;
lhs =0;
rhs =(1-params(40))*params(41)*((-y(33))+y(2)*y(33)*T401)+(params(40)+(1-params(40))*(1-params(41)))*(y(31)-params(47));
residual(35)= lhs-rhs;
lhs =0;
rhs =(1-params(40))*(T413*T414-y(37)/y(36))+params(40)*(y(30)-params(46));
residual(36)= lhs-rhs;
lhs =0;
rhs =(1-params(40))*params(41)*(1+(-1)/y(33)-T398)+(params(40)+(1-params(40))*(1-params(41)))*(y(33)-params(49));
residual(37)= lhs-rhs;
lhs =y(38);
rhs =params(43)*y(19)*T437*T438+y(36)*(1-params(43))*y(35)^(-params(1));
residual(38)= lhs-rhs;
lhs =y(39);
rhs =(-(y(40)-params(20)));
residual(39)= lhs-rhs;
lhs =y(40);
rhs =((1-params(23))*params(20)+params(23)*y(40)+x(1)*0.01)*params(54)*(1-params(55))+params(54)*params(55)*((1-params(23))*params(20)+params(23)*y(40)+params(54)*params(55)*x(2)*params(21)*4)+params(20)*(1-params(54));
residual(40)= lhs-rhs;
lhs =y(41);
rhs =(y(4)+y(5))/y(4);
residual(41)= lhs-rhs;
lhs =y(42);
rhs =y(41);
residual(42)= lhs-rhs;
lhs =y(43);
rhs =y(41)^2;
residual(43)= lhs-rhs;
lhs =y(44);
rhs =y(43)-y(42)^2;
residual(44)= lhs-rhs;
if ~isreal(residual)
  residual = real(residual)+imag(residual).^2;
end
if nargout >= 2,
  g1 = zeros(44, 44);

  %
  % Jacobian matrix
  %

  g1(1,8)=1-params(5)*(1-params(43));
  g1(1,9)=(-(params(43)*params(5)*getPowerDeriv(y(9),1/params(2),1)*T585));
  g1(1,19)=(-(params(43)*T585*params(27)*T18+(1-params(43))*params(27)*y(35)^(1-params(1))/(1-params(1))));
  g1(1,35)=(-(params(43)*T585*params(27)*y(19)*getPowerDeriv(y(35),(1-params(1))/params(2),1)+(1-params(43))*params(27)*y(19)*getPowerDeriv(y(35),1-params(1),1)/(1-params(1))));
  g1(2,2)=1;
  g1(2,8)=(-(params(43)*T568));
  g1(2,9)=(-(params(43)*params(5)*T566*(-T46)/(y(9)*y(9))));
  g1(3,8)=(-(getPowerDeriv(y(8),1-params(1),1)));
  g1(3,9)=1;
  g1(4,3)=(-(params(44)*y(7)));
  g1(4,5)=(-params(44));
  g1(4,6)=(-(params(44)*(-(y(11)*params(15)*(-1)/(y(6)*y(6))))));
  g1(4,7)=(-(params(44)*y(3)));
  g1(4,10)=(-(1-params(44)));
  g1(4,11)=(-(params(44)*(params(15)+(-(1/y(6)*params(15))))));
  g1(4,27)=(-((-params(44))-(1-params(44))));
  g1(4,31)=params(44);
  g1(5,1)=(-(T93*(-y(27))/(y(1)*y(1))*T488));
  g1(5,7)=1;
  g1(5,27)=(-(T93*T488*1/y(1)));
  g1(5,36)=(-(T96*T92*(-y(37))/(y(36)*y(36))));
  g1(5,37)=(-(T96*T92*1/y(36)));
  g1(5,39)=(-(T96*y(37)/y(36)*(-(params(34)*exp(y(39))))/(params(34)*exp(y(39))*params(34)*exp(y(39)))));
  g1(6,2)=(-(y(4)+y(5)));
  g1(6,4)=1-y(2);
  g1(6,5)=(-y(2));
  g1(7,2)=(-y(6));
  g1(7,6)=(-y(2));
  g1(8,3)=(-(exp(y(26))*T108*T527));
  g1(8,10)=1;
  g1(8,11)=(-(T113*exp(y(26))*T607));
  g1(8,20)=(-(exp(y(26))*T108*T724));
  g1(8,23)=(-(T113*exp(y(26))*T754));
  g1(8,26)=(-(exp(y(26))*T108*T113));
  g1(9,11)=1-params(44)*(T136+y(11)*T617);
  g1(9,12)=(-(params(44)*(1+y(11)*T652)));
  g1(9,23)=(-(params(44)*y(11)*(-(params(10)+params(11)/2*2*(y(23)-1)))));
  g1(10,3)=y(7);
  g1(10,7)=y(3);
  g1(10,10)=(-(1-T152));
  g1(10,12)=1;
  g1(10,13)=1;
  g1(10,14)=y(10)*params(13)/2*T672*2*T150;
  g1(11,3)=y(7)-T108*exp(y(26))*(1-params(7))*y(22)*T527;
  g1(11,7)=y(3);
  g1(11,11)=(-(T113*exp(y(26))*(1-params(7))*y(22)*T607));
  g1(11,20)=(-(T108*exp(y(26))*(1-params(7))*y(22)*T724));
  g1(11,22)=(-(T113*T108*exp(y(26))*(1-params(7))));
  g1(11,23)=(-(T113*exp(y(26))*(1-params(7))*y(22)*T754));
  g1(11,26)=(-(T113*T108*exp(y(26))*(1-params(7))*y(22)));
  g1(12,3)=(-(T108*exp(y(26))*params(7)*y(22)*T527));
  g1(12,11)=y(23)*y(15)-T113*exp(y(26))*params(7)*y(22)*T607;
  g1(12,15)=y(11)*y(23);
  g1(12,20)=(-(T108*exp(y(26))*params(7)*y(22)*T724));
  g1(12,22)=(-(T113*T108*exp(y(26))*params(7)));
  g1(12,23)=y(11)*y(15)-T113*exp(y(26))*params(7)*y(22)*T754;
  g1(12,26)=(-(T113*T108*exp(y(26))*params(7)*y(22)));
  g1(13,3)=(-(params(44)*params(42)*T108*exp(y(26))*params(7)*y(22)*T527));
  g1(13,11)=(-(params(44)*params(42)*(y(23)*(-y(16))*(params(10)+(y(23)-1)*params(11))+T113*exp(y(26))*params(7)*y(22)*T607)));
  g1(13,16)=(-(params(44)*params(42)*y(11)*y(23)*(-(params(10)+(y(23)-1)*params(11)))));
  g1(13,20)=(-(params(44)*params(42)*T108*exp(y(26))*params(7)*y(22)*T724));
  g1(13,22)=(-(params(44)*params(42)*T113*T108*exp(y(26))*params(7)));
  g1(13,23)=(-(1-params(44)+params(44)*(1-params(42)+params(42)*(T113*exp(y(26))*params(7)*y(22)*T754+y(11)*((-y(16))*(params(10)+(y(23)-1)*params(11))+y(23)*params(11)*(-y(16)))))));
  g1(13,26)=(-(params(44)*T113*T108*exp(y(26))*params(7)*y(22)*params(42)));
  g1(14,2)=(-(T149*params(13)*T150));
  g1(14,14)=params(13)*T150*T672+T149*params(13)*T672-(T150*y(2)*params(13)*T672+T149*y(2)*params(13)*T672);
  g1(14,22)=(-params(6));
  g1(15,2)=(-(params(44)*T202));
  g1(15,11)=(-(params(44)*y(2)*y(16)*(T617+T198*(-y(12))/(y(11)*y(11))+T132*params(12)*(-y(12))/(y(11)*y(11)))));
  g1(15,12)=(-(params(44)*y(2)*y(16)*(T652+T198*1/y(11)+T132*params(12)*1/y(11))));
  g1(15,15)=(-(params(44)*y(2)*y(23)));
  g1(15,16)=1-params(44)*y(2)*(T136+T132*T198);
  g1(15,23)=(-(params(44)*y(2)*(y(15)+y(16)*(-(params(10)+params(11)/2*2*(y(23)-1))))));
  g1(16,11)=(-(params(44)*(-(params(12)*(-y(12))/(y(11)*y(11))))));
  g1(16,12)=(-(params(44)*(-(params(12)*1/y(11)))-(1-params(44))));
  g1(16,16)=(-1)/(y(16)*y(16))-(1-params(44))*(-1)/(y(16)*y(16));
  g1(17,5)=1;
  g1(17,6)=(-(params(44)*(-(params(15)*(-(y(11)*(-1)/(y(6)*y(6))))))));
  g1(17,11)=(-(params(44)*(-(params(15)*(1-1/y(6))))));
  g1(17,13)=(-(params(44)+1-params(44)));
  g1(18,14)=(-((1-params(16))*params(17)*1/y(14)));
  g1(18,21)=1/y(21)-params(16)*1/y(21);
  g1(19,8)=(-(y(21)/y(14)*T568));
  g1(19,9)=(-(y(21)/y(14)*params(5)*T566*(-T46)/(y(9)*y(9))));
  g1(19,14)=(-(T50*(-y(21))/(y(14)*y(14))));
  g1(19,21)=(-(T50*1/y(14)));
  g1(20,17)=1;
  g1(20,22)=(-((-1)/(y(22)*y(22))));
  g1(21,10)=(-T152);
  g1(21,14)=(-(y(10)*params(13)/2*T672*2*T150));
  g1(21,24)=1;
  g1(22,18)=(-(x(1)*params(55)));
  g1(22,19)=1-params(22);
  g1(23,18)=1-params(23);
  g1(24,20)=1-params(26);
  g1(25,26)=1-params(26);
  g1(26,25)=1-params(31);
  g1(27,1)=(-(T298*getPowerDeriv(y(1),params(4),1)));
  g1(27,29)=(-(y(1)^params(4)*getPowerDeriv(y(29),1-params(4),1)));
  g1(27,35)=1;
  g1(28,1)=(-(T298*params(4)*getPowerDeriv(y(1),params(4)-1,1)));
  g1(28,29)=(-(params(4)*y(1)^(params(4)-1)*getPowerDeriv(y(29),1-params(4),1)));
  g1(28,36)=1;
  g1(29,1)=(-(y(29)^(-params(4))*(1-params(4))*getPowerDeriv(y(1),params(4),1)));
  g1(29,29)=(-(y(1)^params(4)*(1-params(4))*getPowerDeriv(y(29),(-params(4)),1)));
  g1(29,37)=1;
  g1(30,1)=1;
  g1(30,27)=(-(params(34)*exp(y(39))*getPowerDeriv(y(27),params(33),1)*T801));
  g1(30,28)=(-(T801*(1-params(34)*exp(y(39)))*getPowerDeriv(y(28),params(33),1)));
  g1(30,39)=(-(T801*(params(34)*exp(y(39))*y(27)^params(33)+y(28)^params(33)*(-(params(34)*exp(y(39)))))));
  g1(31,3)=1;
  g1(31,29)=1;
  g1(31,30)=1;
  g1(32,28)=1;
  g1(32,30)=(-(params(44)*(1-params(40))*(y(34)*y(32))^params(35)*getPowerDeriv(y(30),1-params(35),1)+(1-params(44))*(1-params(40))*getPowerDeriv(y(30),1-params(35),1)));
  g1(32,32)=(-(T335*params(44)*(1-params(40))*y(34)*getPowerDeriv(y(34)*y(32),params(35),1)));
  g1(32,34)=(-(T335*params(44)*(1-params(40))*y(32)*getPowerDeriv(y(34)*y(32),params(35),1)));
  g1(33,31)=(-((1-params(40))*params(41)*(1+y(32)*T859)));
  g1(33,32)=1-(1-params(40))*params(41)*(T363+y(32)*T886);
  g1(33,34)=(-((1-params(40))*params(41)*y(32)*(-(params(37)+params(38)/2*2*(y(34)-1)))));
  g1(34,27)=(-(params(41)*params(42)*(1-params(40))*T385*(-y(28))/(y(27)*y(27))*T806));
  g1(34,28)=(-(params(41)*params(42)*(1-params(40))*(T387*T383*T820+T385*T806*1/y(27))));
  g1(34,32)=(-(params(41)*params(42)*(1-params(40))*T387*T383*(-y(28))/(y(32)*y(32))));
  g1(34,33)=(-(params(41)*params(42)*(1-params(40))*(params(37)+(y(34)-1)*params(38))*(-y(34))));
  g1(34,34)=(-(params(40)+(1-params(40))*(1-params(41))+params(41)*params(42)*(1-params(40))*((-y(33))*(params(37)+(y(34)-1)*params(38))+params(38)*y(34)*(-y(33)))));
  g1(34,39)=(-(params(41)*params(42)*(1-params(40))*T387*y(28)/y(32)*params(35)*(params(34)*exp(y(39))*(-(params(34)*exp(y(39))))-params(34)*exp(y(39))*(1-params(34)*exp(y(39))))/(params(34)*exp(y(39))*params(34)*exp(y(39)))));
  g1(35,2)=(-((1-params(40))*params(41)*y(33)*T401));
  g1(35,31)=(-(params(40)+(1-params(40))*(1-params(41))+(1-params(40))*params(41)*y(2)*y(33)*(T859+T398*T820+T359*params(39)*T820)));
  g1(35,32)=(-((1-params(40))*params(41)*y(2)*y(33)*(T886+T398*(-y(31))/(y(32)*y(32))+T359*params(39)*(-y(31))/(y(32)*y(32)))));
  g1(35,33)=(-((1-params(40))*params(41)*((-1)+y(2)*T401)));
  g1(35,34)=(-((1-params(40))*params(41)*y(2)*y(33)*(params(37)+(y(34)-1)*params(38)+y(34)*params(38)-(params(37)+params(38)/2*2*(y(34)-1)))));
  g1(36,1)=(-((1-params(40))*T414*(1-params(34)*exp(y(39)))*(1-params(35))*(-y(28))/(y(1)*y(1))*T504));
  g1(36,28)=(-((1-params(40))*(T414*(1-params(34)*exp(y(39)))*(1-params(35))*T504*1/y(1)+T413*1/y(30))));
  g1(36,30)=(-(params(40)+(1-params(40))*T413*(-y(28))/(y(30)*y(30))));
  g1(36,36)=(-((1-params(40))*(-((-y(37))/(y(36)*y(36))))));
  g1(36,37)=(-((1-params(40))*(-(1/y(36)))));
  g1(36,39)=(-((1-params(40))*T414*T412*(1-params(35))*(-(params(34)*exp(y(39))))));
  g1(37,31)=(-((1-params(40))*params(41)*(-(params(39)*T820))));
  g1(37,32)=(-((1-params(40))*params(41)*(-(params(39)*(-y(31))/(y(32)*y(32))))));
  g1(37,33)=(-(params(40)+(1-params(40))*(1-params(41))+(1-params(40))*params(41)*1/(y(33)*y(33))));
  g1(38,1)=(-(params(43)*y(19)*T437*(-y(27))/(y(1)*y(1))*getPowerDeriv(T94,params(33)-1,1)));
  g1(38,8)=(-(params(43)*y(19)*T438*params(34)*exp(y(39))*y(36)*1/y(35)*T575));
  g1(38,19)=(-(params(43)*T437*T438));
  g1(38,27)=(-(params(43)*y(19)*T437*getPowerDeriv(T94,params(33)-1,1)*1/y(1)));
  g1(38,35)=(-(params(43)*y(19)*T438*params(34)*exp(y(39))*y(36)*T575*(-y(8))/(y(35)*y(35))+y(36)*(1-params(43))*getPowerDeriv(y(35),(-params(1)),1)));
  g1(38,36)=(-((1-params(43))*y(35)^(-params(1))+params(43)*y(19)*T438*params(34)*exp(y(39))*T435));
  g1(38,38)=1;
  g1(38,39)=(-(params(43)*y(19)*T437*T438));
  g1(39,39)=1;
  g1(39,40)=1;
  g1(40,40)=1-((1-params(55))*params(23)*params(54)+params(54)*params(55)*params(23));
  g1(41,4)=(-((y(4)-(y(4)+y(5)))/(y(4)*y(4))));
  g1(41,5)=(-(1/y(4)));
  g1(41,41)=1;
  g1(42,41)=(-1);
  g1(42,42)=1;
  g1(43,41)=(-(2*y(41)));
  g1(43,43)=1;
  g1(44,42)=2*y(42);
  g1(44,43)=(-1);
  g1(44,44)=1;
  if ~isreal(g1)
    g1 = real(g1)+2*imag(g1);
  end
end
if nargout >= 3,
  %
  % Hessian matrix
  %

  g2 = sparse([],[],[],44,1936);
end
end
